package hxy.dragon.provider.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author eric
 * @description
 * @date 2022/11/25
 */
@RestController
public class SystemController {

    @Value("${server.port}")
    Integer port;

    @RequestMapping(value = {"/", "/system/info", "gate/system/info"})
    public String systemInfo() {
        return "服务提供者" + port;
    }

    @RequestMapping("gate/exception")
    public String exception() {
//        throw new RuntimeException("内部错误啦！！！");
        return "没有异常正常的！！";
    }

}
